﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manage_BidLogList : System.Web.UI.Page, IAccess
{
    protected void Page_Load(object sender, EventArgs e)
    {

        CurrentAccount.CheckSessionTimeOut(this);
        if (!IsPostBack)
        {
            Bind();
        }
    }
    protected void pager1_PageChanging(object sender, HZ.Web.PageChaningEventArgs e)
    {
        Bind();
    }

    private void Bind()
    {
        int totalrecord;

        string append;
       

        var bidprice = BLL_Factory.IBLL_Manage.GetBidLog(new HZ.BidSystem.Model.QLog() { SortFields = "Date desc", Message = txtObject.Text.Trim() }, pager1.CurrentPage, pager1.PageSize, out totalrecord);

        pager1.RecordCount = totalrecord;

        gv1.DataSource = bidprice;
        gv1.DataBind();
    }
    protected void btnQuery_Click(object sender, EventArgs e)
    {
        pager1.CurrentPage = 1;
        Bind();
    }
    protected void gv1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        gv1.EditIndex = e.NewEditIndex;
        Bind();
    }
   
    #region IAccess Members

    IList<EnumAccess> IAccess.AccessList
    {
        get
        {
            var list = new List<EnumAccess>();
            list.Add(EnumAccess.Manage);
            return list;
        }

    }

    #endregion
   
}
